package com.mxpio.erp.common.jpa.model;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.jpa.policy.impl.CreatedDatePolicy;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.User;
import com.mxpioframework.security.service.policy.ModifierPolicy;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 检验单明细父类
 * @author MxpIO
 */
@Data
@MappedSuperclass
@EqualsAndHashCode(callSuper=false)
public abstract class QualityOrderLine extends NoticeLine {

	private static final long serialVersionUID = 1L;


    @Column(name = "ACCEPTANCE_BY_")
    @Schema(description = "验收人")
    @Dict(dicCode = "username", dicEntity = User.class, dicText = "nickname")
    private String acceptanceBy;

    @Column(name = "ACCEPTANCE_TIME_")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "验收时间")
    private Date acceptanceTime;
	
	@Column(name = "CHECK_QUANTITY_")
    @Schema(description = "检验数量")
    private BigDecimal checkQuantity;
	
	@Column(name = "UNQUALIFIED_QUANTITY_")
    @Schema(description = "不合格数量")
    private BigDecimal unqualifiedQuantity;
	
	@Column(name = "CONCESSION_QUANTITY_")
    @Schema(description = "让步接收")
    private BigDecimal concessionQuantity;
	
	@Column(name = "CHECK_RESULT_")
    @Schema(description = "检验结论")
    @Dict(dicCode = "MB_QUALITY_CHECK_RESULT")//0不合格，1合格 从InpectionBill中获取
	private String checkResult;

}
